﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SIAKADCORE.Models
{
    public class NilaiAkhir
    {
        #region Constants
        public const int Length = 10;
        public const string IdPrefix = "NA";
        public const string Tablename = "[dbo].[nilai_akhir]";
        public const string ColumnNameIdNilaiAkhir = "[id_nilai_akhir]";
        public const string ColumnNameIdDetailPengambilanMatakuliah = "[id_Detail_pengambilan_matakuliah]";
        public const string ColumNameIsiNilaiAkhir = "[nilai_akhir]";
        public const string ColumnNameIsiNilaiHuruf = "[nilai_huruf}";
        #endregion

        #region Fields
        private string idNilaiAkhir;
        private string idDetailPengambilanMatakuliah;
        private double isiNilaiAkhir;
        private string isiNilaiHuruf;
        #endregion

        #region Properties
        public string IdNilaiAkhir
        {
            get { return this.idNilaiAkhir; }
            set { this.idNilaiAkhir = value; }
        }

        public string IdDetailPengambilanMatakuliah
        {
            get { return this.idDetailPengambilanMatakuliah; }
            set { this.idDetailPengambilanMatakuliah = value; }
        }

        public double IsiNilaiAkhir
        {
            get { return this.isiNilaiAkhir; }
            set { this.isiNilaiAkhir = value; }
        }

        public string IsiNilaiHuruf
        {
            get { return this.isiNilaiHuruf; }
            set { this.isiNilaiHuruf = value; }
        }
        #endregion

        #region Constructors
        public NilaiAkhir(string idNilaiAkhir, string idDetailPengambilanMatakuliah, double isiNilaiAkhir, string isiNilaiHuruf)
        {
            this.idNilaiAkhir = idNilaiAkhir;
            this.idDetailPengambilanMatakuliah = idDetailPengambilanMatakuliah;
            this.isiNilaiAkhir = isiNilaiAkhir;
            this.isiNilaiHuruf = isiNilaiHuruf;
        }
        #endregion 
        public override string ToString()
        {
            return string.Format("ID_NILAI_AKHIR: {0} | ID_dETAIL_PENGAMBILAN_MATAKULIAH: {1} | ISI_NILAI_AKHIR: {2} | ISI_NILAI_HURUF: {3}", this.idNilaiAkhir, this.idDetailPengambilanMatakuliah, this.isiNilaiAkhir, this.isiNilaiHuruf);
        }
    }
}
